
#pragma once

#include <gpiod.h>
#include <vector>
#include <string>
#include <chrono>
#include <thread>

#include <stdio.h>
#include <unistd.h>
#include <libserialport.h>

#include <iostream>

#include "rs485_v3.hpp"
#include "agile_modbus_rtu_master.hpp"
#include "yj_return.hpp"
#include "config.h"

typedef struct
{
    float temperature;//°C
    float humidity;//%RH
}hk_sht30_data_t,*Phk_sht30_data_t;


yj_return hk_sht30_init(void);
void hk_sht30_deinit(void);
yj_return hk_sht30_read_all(hk_sht30_data_t *data);
void hk_sht30_print_data(hk_sht30_data_t *data);